#ifndef ARRAY_H 
#define ARRAY_H
 
#define ASSERT(cond, msg) if (cond) {} else {throw msg;}

template<class T>
class Array{
private:
protected:
    Array(const Array&);

protected:
    Array();
    virtual const T* start() const { return 0; }
    virtual T* start() { return 0; }

    virtual void resize(int reqSize) {}
    virtual void assign(const Array<T>& src);

public:
    void valid(const int i) const;
    void valid(const int i, const int count) const;

    virtual void valid() const;

    virtual int size() const { return 0; }
    virtual ~Array() { valid(); }

    const T& operator[](const int i) const;
    T& operator[](const int i);

    void operator=(const Array<T>& src);

    void move(const int start, const T source[], const int count);
    void move(const int dstStart, const Array<T>& src, const int srcStart, const int count);

    void fill(const int start, const T& o, const int count);
    void zeroize();
};  

#include "array_impl.h"

#endif /*#define ARRAY_H*/
